package com.zhao.service.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 定时任务
 * 
 * @author zhaoyongfei
 *
 */
@Component
public class ScheduledTask {

	@Autowired
	TaskExecutorTask taskExecutorTask;

	//	@Scheduled(fixedDelay = 5000)
	//	public void doSomething() {
	//		// something that should execute periodically
	//	}
	//
	//	@Scheduled(fixedRate = 5000)
	//	public void doSomething() {
	//		// something that should execute periodically
	//	}
	//
	//	@Scheduled(initialDelay = 1000, fixedRate = 5000)
	//	public void doSomething() {
	//		// something that should execute periodically
	//	}

	@Scheduled(cron = "*/5 * * * * MON-FRI")
	public void doSomething() {
		// something that should execute on weekdays only
		//		taskExecutorExample.printMessages();
	}
}
